<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class Property extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'properties';

    const PROPERTY_TYPE = [
        0 => '无',
        1 => '高层',
        2 => '洋房',
        3 => '公寓',
    ];

    const DECORATION_STATUS = [
        0 => '无',
        1 => '毛坯',
        2 => '简装',
        3 => '精装',
    ];

    const PEOPERTY_RIGHTS = [
        0 => '无',
        1 => '商品房',
        2 => '回迁房',
    ];

     const MORTGAGE_STATUS = [
         0 => '无',
         1 => '全款',
         2 => '抵押',
     ];

      const STATUS = [
          0 => '待审核',
          1 => '已上架',
          2 => '已成交',
      ];

    public function community()
    {
        return $this->belongsTo(Community::class,'community_id','id');
    }

}
